import Header from "../../../components/Header";
import {Row, Col, Dropdown} from "../../../rsuite";
import {Link} from "react-router";
import {connect} from "react-redux";
import NoData from "../../../components/nodata";
import Search from "../../../components/search";
import Panel from "../../../elements/Panel";
import Pagination from "../../../components/Pagination/";
import Config from "../../../libs/config";
import {SUBJECT, PAGE_SUBJECT} from "../../../actions/subject";
import {fetch, fetch_remove, enable_delete_btn, selectAllItem, selectItem} from "../../../actions";
import {md5Url, URL} from '../../../libs/Url';
import FormItemRef from '../../../components/FormItemRef';
import FormItemType from '../../../components/FormItemType';

const Feedback = React.createClass({
    getInitialState(){
        return {
            form: [
                {
                    name: 'title',
                    label: '问题标题',
                    value: '',
                    required: true,
                    type: FormItemType.INPUT,
                    placeholder: '',
                    tips: '',
                },
                {
                    name: 'desc',
                    label: '问题描述',
                    value: '',
                    required: true,
                    type: FormItemType.INPUT,
                    placeholder: '',
                    tips: '',
                },
            ]
        }
    },
    componentDidMount() {
        const {dispatch} = this.props;
        dispatch(fetch({url: URL.TEACH_SCHEDULE_FIND}));
    },
    render(){
        const self = this;
        const {dispatch} = this.props;
        console.log(this.state.form);
        return (
            <Panel>
                <Header>报修/意见反馈</Header>
                <div className="table-list-head row">
                    <FormItemRef
                        addRow={true}
                        labelAlign="right"
                        textWidth={8}
                        addM={true}
                        form={this.state.form}
                        onsubmit={(data)=> {
                        }}
                    />
                </div>
            </Panel>
        )
    }
});
function select(state) {
    return {
        //[md5Url.TEACH_SCHEDULE_FIND]: state.fetchBySubject[md5Url.TEACH_SCHEDULE_FIND],
        //[PAGE_SUBJECT.TEACH_SCHEDULE]: state.pageBySubject[PAGE_SUBJECT.TEACH_SCHEDULE],
    }
}
export default connect(select)(Feedback)